
#ifndef ITF_DEBUG_HEADER
#define ITF_DEBUG_HEADER

#ifdef DEBUG
#define DEBUG_PRINT(x) if(FDEBUG)fprintf x; fflush(FDEBUG)
#define DEBUG_INIT(x) debug_init(x)
#define DEBUG_END() debug_end()
#else
#define DEBUG_PRINT(x) do {} while (0)
#define DEBUG_INIT(x) do {} while (0)
#define DEBUG_END() do {} while (0)
#endif

#ifdef __cplusplus
extern "C" {
#endif
    
extern FILE *FDEBUG;

void debug_init(char *filename);
void debug_end();

#ifdef __cplusplus
}
#endif

#endif
